package com.gao.api.gate.quick.core.lifecycle;

import java.util.EventObject;


public final class LifecycleEvent extends EventObject {

    private static final long serialVersionUID = 1L;

    public LifecycleEvent(Lifecycle lifecycle, LifecycleState state, Object data) {
        super(lifecycle);
        this.state = state;
        this.data = data;
    }

    private final Object data;

    private final LifecycleState state;

    public Object getData() {
        return data;
    }

    public Lifecycle getLifecycle() {
        return (Lifecycle) getSource();
    }

    public LifecycleState getState() {
        return state;
    }
}
